'use strict'

module.exports = {
	async up(queryInterface, Sequelize) {
		/**
		 * Add altering commands here.
		 *
		 * Example:
		 * await queryInterface.createTable('users', { id: Sequelize.INTEGER });
		 */
		await queryInterface.createTable('articals', {
			id: Sequelize.INTEGER,
			title: Sequelize.STRING,
			content: Sequelize.TEXT,
			summary: Sequelize.STRING,
			category_id: Sequelize.INTEGER,
			thumbnail: Sequelize.STRING,
			is_top: Sequelize.STRING,
			status: Sequelize.STRING,
			view_count: Sequelize.INTEGER,
			is_comment: Sequelize.STRING,
			create_by: Sequelize.STRING,
			create_at: Sequelize.STRING,
			update_at: Sequelize.STRING,
			delete_at: Sequelize.STRING,
		})
	},

	async down(queryInterface, Sequelize) {
		/**
		 * Add reverting commands here.
		 *
		 * Example:
		 * await queryInterface.dropTable('users');
		 */
		await queryInterface.dropTable('articals')
	},
}
